#pragma once
#include "UIlib.h"
#include <opencv2/opencv.hpp>
#include "WuDong.h"
#include "TaskThread.h"
using namespace DuiLib;

//////////////////////////////////////////////////////////////////////////
///

class CMainWnd : public WindowImplBase
{
public:
	CMainWnd();
	~CMainWnd();

public:
	DuiLib::CDuiString GetSkinFile();
	LPCTSTR GetWindowClassName() const;
	UINT GetClassStyle() const;
	void InitWindow();
	void OnFinalMessage(HWND hWnd);

	CControlUI *CreateControl(LPCTSTR pstrClass);

	void Notify(TNotifyUI &msg);
	void OnClick(CControlUI *pControl);

	DUI_DECLARE_MESSAGE_MAP()

	LRESULT OnDestroy(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL &bHandled);

	LRESULT HandleCustomMessage(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);

	virtual LRESULT OnLButtonDown(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL &bHandled) override;

	virtual LRESULT OnSysCommand(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled);

private:
private:
	TaskThread *m_taskThread = nullptr;
	WuDong m_wuDong;
};
